package commRedisRpc

import (
	"encoding/json"
	commRedisRpc "gitee.com/fierce_wolf/go-fox-edge-common/commRedisList"
)

type redisListManagerServerRespond struct {
	redisList commRedisRpc.RedisValueService
}

func (e *redisListManagerServerRespond) Push(hashKey string, value *RestFulRespondVO) error {
	mainKey := "fox.edge.list:manager:restful:message:respond"

	code, err := json.Marshal(value)
	if err != nil {
		return err
	}

	jsn := string(code)
	err = e.redisList.PHSet(mainKey, hashKey, jsn)
	if err != nil {
		return err
	}
	return nil
}
